import { Grid } from "antd-mobile";
import HomeSwiper from "./components/home-swiper";
import "./index.scss";
// import today1 from "../../assets/img/ic_today_1.png";
function getImageUrl(i: number) {
  return new URL(`../../assets/img/ic_today_${i}.png`, import.meta.url).href;
}

export default function Today() {
  const grid = ["专注闹钟", "呼吸训练", "睡眠助手", "解压木鱼"];
  return (
    <div>
      <HomeSwiper />
      <Grid columns={4}>
        {grid.map((item, index) => {
          return (
            <Grid.Item className="my-grid-item">
              <img src={getImageUrl(index + 1)} alt="" />
              <h3>{item}</h3>
            </Grid.Item>
          );
        })}
      </Grid>
    </div>
  );
}
